<template>
    <div id="Topnav">
        <ul>
            <li v-for="(item,index) in list " :key='index' >
                <router-link :to='item.path' active-class='topactive'>{{item.title}}</router-link>
            </li>
        </ul>
    </div>
</template>

<script>
    export default {
       props:['list']
    }
</script>

<style lang="less" scoped>
@color: rgb(254, 217, 6);
#Topnav{
    width: 100%;
    height: 1rem;
    background: #333;
   ul{
        display: flex;
        width: 90%
   }
    li{
        flex: 0.7;
        height: 1rem;
        line-height: 1rem;
        float: left;
        text-align: center;
        a{
            display: block;
            width: 100%;
            height: 94%;
            font-size: 0.35rem;
            font-family: fantasy;
            color:#fff
        }
        span{
            color: #fff;
            font-size: 0.45rem
        }
    }
    .topactive{
         color:@color;
         border-bottom:1.5px solid  rgb(254, 217, 6)
  }
}

</style>